# grades = list(85, 92, 78, 90, 88)
grades = [85, 92, 78, 90, 88]


def add_grade(grades, new_grade):
    grades.append(new_grade)

def calculate_average(grades):
    return sum(grades)/len(grades)

def get_highest(grades):
    return max(grades)

def get_lowest(grades):
    return min(grades)

def count_passing(grades, passing_grade=60):
    a=0
    for i in grades:
        if i >= 60:
            a=a+1
        if i < 60:
            a=a
    return a



# 添加新成绩
add_grade(grades, 95)
print(grades)  # [85, 92, 78, 90, 88, 95]

# 计算统计数据
平均 = calculate_average(grades)
最高 = get_highest(grades)
最低 = get_lowest(grades)
及格数 = count_passing(grades)

print(f"平均分：{平均:.2f}")
print(f"最高分：{最高}")
print(f"最低分：{最低}")
print(f"及格数：{及格数}/{len(grades)}")